package service;

import entity.Card;
import entity.CountResult;
import entity.Poker;
import entity.Strategy;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import java.util.*;

/**
 * 百家乐的大杂烩
 */
@Service
public class BaccaratService {
    public static void strategy(CountResult res) {
            Strategy strategy = new Strategy();
            strategy.strategy2335();
            Card card = new Card();
            strategy.run(card.comparePoint());
            if (strategy.getAmount() >= 550) {
                res.setWinTime(res.getWinTime() + 1);
            } else if (strategy.getAmount() <= 340) {
                res.setFailTime(res.getFailTime() + 1);
            }
            res.setProfit(res.getProfit() + strategy.getAmount() - 340);
        }
}
